A context engineer is reviewing an agent built on Databricks that assists warehouse operations staff with inventory queries. The agent is configured with a system prompt (120 tokens), a conversation history window (400 tokens), 10 tool definitions averaging 180 tokens each (1,800 tokens total), and a RAG pipeline that retrieves a document chunk of 1,600 tokens at runtime. The total context regularly exceeds the model’s 4,096-token limit, causing truncation of conversation history and degraded multi-turn coherence. Usage logs show that session variety is low, task patterns are repetitive, and on average, 3-4 tools are invoked per session.
Which change to the agent configuration will most effectively reduce token budget and improve model focus?
Answer : D
A context engineer is building a retail agent using Agent Bricks Custom Agents. The agent has two registered tools: a SQL query tool that queries a live inventory database, and a vector search tool that searches a static product catalog vector index for product descriptions, specifications, and categories. Both tools are correctly configured, functioning, and returning valid results when called.
At runtime, when users ask questions such as, “Is this item in stock?”, the agent consistently calls the product catalog tool and gives a plausible availability answer without checking the live inventory database. The product catalog tool is not intended to answer live stock availability questions.
Which context engineering issue explains this behavior?
Answer : B
A context engineer is preparing to deploy a per-tenant Databricks agent for a SaaS retail analytics platform. Each customer of the platform is provisioned with their own Unity Catalog catalog, retail_<customer>, and inside each tenant catalog, the data is organized by business domain rather than by origin. The sales schema holds the customer’s POS transaction and returns tables, which the customer’s source systems write to throughout the day, alongside daily_sales_by_store, hourly_revenue_by_category, and top_skus_weekly summary tables that a nightly Lakeflow Jobs pipeline produces by reading those POS tables. The inventory schema holds stock-level and inbound-shipment tables written continuously by ingestion, alongside demand_forecast_7d and reorder_suggestions tables produced by the SaaS’s ML pipelines. The customer schema holds customer master records and contact tables, all populated by ingestion. The SaaS deploys one agent per customer through Model Serving, and each agent has its own service principal. The governance requirements before any agent endpoint is registered are that the agent for a given customer must only be able to retrieve data from that customer’s catalog and never from another customer’s catalog, and that within its own customer’s catalog the agent must only be able to retrieve from tables populated directly by the customer’s ingestion pipelines, never from the nightly summaries, forecasts, or other tables produced by SaaS pipelines.
Which governance approach should the context engineer implement for each tenant’s agent before registration?
Answer : D
A context engineer is designing an MCP server for a Databricks agent that connects to a catalog of 30 tools. The server uses a progressive disclosure architecture to manage a strict token budget. At startup, the agent loads only tool names and one-sentence descriptions. After receiving a user request to query a specific Unity Catalog table, the agent evaluates the catalog and identifies one tool as the likely match, and needs to proceed to the next stage of the architecture.
What should the agent do at the inspect layer?
Answer : B
A context engineer is building a compound AI system for a hospital network using Agent Bricks Custom Agents. The system answers clinician questions about a specific patient’s medication history. Patient records are stored in a Delta table that is updated continuously as new prescriptions, refills, and discontinuations are recorded, and clinicians must see the most current state of a patient’s record at the moment they submit a query. HIPAA’s minimum necessary rule requires that the system retrieve only the requesting patient’s records rather than searching across the broader patient population. End-to-end latency per query must remain under two seconds.
Which retrieval strategy should the context engineer implement?
Answer : B
A context engineer is building a Databricks agent that autonomously manages a multi-day incident response workflow. The agent processes a continuous stream of structured log entries, tool call results, and short status updates. Recent messages tend to drive decisions, while earlier messages are frequently superseded by newer updates during the workflow. The engineer is evaluating whether to implement a hard-coded sliding-window trimming heuristic that drops messages older than a fixed turn count, or to invest in a semantic compaction approach that summarizes and condenses prior context before dropping it.
Which characteristic of this agent’s information relevance pattern justifies using the hard-coded sliding-window trimming heuristic rather than a semantic compaction approach?
Answer : C
An AI engineer is auditing a Databricks compliance agent that has processed 65 conversation turns for a quarterly financial audit. The context window is at 92% capacity, and several open audit findings remain. The engineer wants to clear specific raw tool outputs from the message history to recover space, without compacting the conversation, and is reviewing four tool_result blocks. They also want to minimize the risk of losing information the agent still depends on.
The history contains:
- A ledger reconciliation output at turn 7 returning 8,800 tokens of raw transaction rows from a read-only general ledger. The agent computed aggregated taxable and non-taxable totals from these rows and passed those totals to the tax classification call at turn 10. The agent’s later replies and tool calls do not quote any of the underlying transaction rows.
- A tax classification output at turn 10 returning 5,200 tokens of per-line bucket breakdowns across 312 transaction lines. The agent extracted the bucket totals and passed them to the compliance flag call at turn 13. The agent’s later replies and tool calls do not quote any of the per-line bucket assignments.
- A compliance flag output at turn 13 returning 95 tokens with three flag codes and one-sentence explanations. The agent quotes specific flag codes and explanations from this output in turns 24, 38, and 61, building them into the audit findings it is currently drafting.
- A vendor master lookup output at turn 19 returning 3,400 tokens of supplier records and tax IDs from a read-only vendor master database. The agent quotes a vendor name and tax ID from this output in turns 41 and 57.
Which tool outputs should the engineer clear?
Answer : A
A context engineer is building a Databricks research agent that produces analyst reports in which every claim must cite a verifiable source: a reviewer has to be able to trace each citation back to its exact original source text. At each step, the agent calls a retrieval tool that returns several short source snippets, writes a reasoning trace explaining how those snippets support its conclusions, and appends both the snippets and the reasoning to a running context that later steps reuse. As the run grows, that accumulated context pushes per-step token cost above the team’s budget, so the context must be compacted to bring token spend down.
Which compaction strategy fits both the citation requirement and the token-reduction need?
Answer : B
A context engineer is reviewing an MLflow trace for a Databricks compliance agent mid-workflow on a quarterly regulatory review for a regional bank. The agent’s design pattern is to retrieve regulatory clauses, extract structured obligations with regional metadata and source citations, validate each obligation through the rules engine, and synthesize the audit memo from the structured intermediate plus the validation outcomes. The context window is approaching the compaction threshold, and compaction will fire before the workflow completes.
The trace contains three executed spans and one queued span:
- Span 1 (RETRIEVER): pulled 22 regulatory clause excerpts from the compliance vector index. Output: 22 documents (8,400 tokens) of raw clause text with metadata for source URI and section ID.
- Span 2 (LLM/CHAT_MODEL): produced a structured intermediate (410 tokens) containing three extracted compliance obligations, each annotated with a regional applicability tag describing how the bank’s state-level regulations modify the federal requirement and a source citation pointing back to the originating clause.
- Span 3 (TOOL): ran the three obligations through the rules engine and returned a structured pass/fail report (280 tokens) with one outcome entry per obligation. Each entry contains the obligation ID, the pass/fail value, and a brief explanation of the rule that determined the outcome.
- Span 4 (LLM/CHAT_MODEL, queued): will draft the compliance memo for the bank’s audit team.
Which content from the executed spans is safe to let the compactor summarize without affecting span 4’s execution?
Answer : A
A context engineer is debugging a long-running data pipeline orchestration agent that executes multi-step workflows using registered Databricks tools such as run_job, query_catalog, and validate_schema. After compaction occurs at turn 40, the agent begins re-invoking tools it already called successfully earlier in the session and ignoring results that downstream steps depend on. Inspection of the compacted context shows the summarization prompt was instructed to retain only the final state of each pipeline stage. The current compaction prompt reads: “Summarize the current pipeline state in a few sentences and include only what is necessary.”
Which revision to the compaction prompt addresses the coherence failure while keeping token cost low?
Answer : B
A context engineer is tuning a compaction prompt for a Databricks agent that summarizes customer support ticket histories before passing them to a downstream LLM. The trace being compacted spans 40 turns, and the compacted output must fit within the downstream LLM’s context window. During initial evaluation against a benchmark of escalated support cases, the engineer observes that the compaction output consistently omits several prior resolutions and key escalation events, even though the compacted output fits well within the downstream LLM’s context window.
Which tuning step should the engineer take next?
Answer : C
An AI engineer is building a multimodal agent for a media company’s archive team. The archive contains thousands of titles spanning two decades (full episodes, raw interviews, and unedited B-roll), ingested as monolithic files. Producers use the agent to answer visual content questions about archival footage, such as whether a specific asset contains a usable exterior shot of a landmark. When a producer asks this kind of question, the agent’s retrieval tool loads the full asset into context so the model can examine it, even though only a small portion of the asset is relevant. After a few such retrievals, the context window fills. The engineer needs to reduce context pressure through proactive design changes rather than relying on compaction.
Which proactive context management strategy should the engineer apply to address this problem?
Answer : D
A context engineer is reviewing a Databricks agent that coordinates a multi-week pharmaceutical supply chain compliance workflow across dozens of distribution centers. The agent uses a flat task decomposition strategy, breaking the entire workflow into a single-level list of atomic tasks dispatched and tracked independently. The workflow contains clusters of tightly coupled sub-tasks, such as per-facility inspection records that must all complete before a regional compliance certificate can be issued, and the agent repeatedly fails to coordinate these cluster-level completions correctly. Logs show the agent loses track of intermediate group states, issues compliance certificates prematurely on incomplete facility data, and cannot recover gracefully when individual facility inspection tasks fail.
Which two changes should the context engineer make to resolve the observed failure? (Choose two.)
Answer : CD
A context engineer is building a Databricks agent that orchestrates a multi-step data quality remediation workflow across a large enterprise dataset. The agent iterates through validation rules, flags violations, applies corrections, and logs each remediation action. The workflow can span dozens of steps and may be interrupted by cluster preemption or network timeouts. Business stakeholders require that every correction applied to the dataset be traceable and reversible, and the agent must be able to resume mid-workflow without reapplying corrections already committed to prior records.
Which state management approach satisfies these requirements?
Answer : D
A context engineer is debugging a Databricks agent responsible for a multi-month clinical trial data processing pipeline. The agent uses a fixed sequential chaining strategy, executing each processing stage in a predetermined order regardless of which stages have already completed successfully. When upstream data sources are delayed or partially available, the agent restarts the entire chain from the beginning, discarding all previously completed stage outputs. Logs show that stages with no dependency on the delayed source are being blocked unnecessarily, and total pipeline runtime has grown to an unacceptable length due to repeated full restarts on partial failures.
Which two changes should the context engineer make to resolve the observed failure pattern? (Choose two.)
Answer : AE
Have any questions or issues ? Please dont hesitate to contact us